package com.example.test.controller.Delegate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@RequestMapping("/payment")
public class DelagateaController {

    @Autowired
    @Qualifier("delegatePayImpl")
    private DelegatePay delegatePay;

    @GetMapping("/pay")
    public void pay(){
        delegatePay.pay();
    }

    @GetMapping("/refund")
    public Res refund(){
        return delegatePay.refund();
    }
}
